Skip to content

Add compiler option to control code formatting#513

Closed
ZacSweers wants to merge 2 commits intogoogle:masterfrom
ZacSweers:z/formattingFilerOption
Closed

Add compiler option to control code formatting#513
ZacSweers wants to merge 2 commits intogoogle:masterfrom
ZacSweers:z/formattingFilerOption

Conversation

@ZacSweers
Copy link
Copy Markdown

@ZacSweers ZacSweers commented Nov 23, 2016

This keeps the current formatting behavior by default, while allowing developers to opt out if they want via flag. Was going to open an issue but figured it would be better to just propose it as a PR.

Disabling has two main uses in my experience:

  • The formatting step can actually be a significant chunk of compile time, and for those that don't need/want it gives them an option to disable it.
  • For us, the formatting actually causes build flakiness due to a JDK bug. We've currently been operating off of a fork that disables this entirely, but it would be nice to just point to upstream.

I couldn't find where CompilerOptions are tested, if anywhere. Let me know if there's somewhere I should add tests.

Edit: Resolves #515, resolves #457 and can help mitigate #368

This keeps the current formatting behavior by default, while allowing developers to opt out if they want via flag. Was going to open an issue but figured it would be better to just propose it as a PR.

Disabling has two main uses in my experience:
- The formatting step can actually be a significant chunk of compile time, and for those that don't need/want it gives them an option to disable it.
- For us, the formatting actually causes build flakiness due to a JDK bug. We've currently been operating off of a fork that disables this entirely, but it would be nice to just point to upstream.

I couldn't find where CompilerOptions are tested, if anywhere. Let me know if there's somewhere I should add tests
@ZacSweers ZacSweers changed the title Add compiler option to control code formatting (Proposal PR) Add compiler option to control code formatting Nov 23, 2016
@ronshapiro ronshapiro changed the title (Proposal PR) Add compiler option to control code formatting Add compiler option to control code formatting Nov 30, 2016
@ZacSweers
Copy link
Copy Markdown
Author

Forgot this still existed

@ZacSweers ZacSweers closed this Sep 23, 2017
@ZacSweers ZacSweers deleted the z/formattingFilerOption branch September 23, 2017 02:11
@ZacSweers
Copy link
Copy Markdown
Author

This is done in 6814a21 now, for those wondering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Make code formatter configurable MissingResourceException when running in a gradle project with many submodules

2 participants